package com.gxa.pingan.service;

import com.gxa.pingan.exception.BusinessException;
import com.gxa.pingan.pojo.Driver;

import java.util.List;
import java.util.Map;

/**
 * @Author ChenJin
 * @date 2021/10/28 12:47
 * Description:
 **/
public interface DriverService {

    /**
     * 添加司机
     *
     * @param driver 司机对象
     * @throws BusinessException
     */
    void insert(Map<String,Object> driver) throws BusinessException;

    /**
     * 获取司机信息
     * @param id 司机编号
     * @return
     * @throws BusinessException
     */
    Driver getDriver(Long id) throws BusinessException;

    /**
     * 获取司机列表信息
     * @param value 搜索框的值
     * @param page 页码
     * @param size 大小
     * @return
     * @throws BusinessException
     */
    List<Driver> getList(String value, Integer page, Integer size) throws BusinessException;

    /**
     * 获取司机列表数据总数
     * @param value
     * @return
     * @throws BusinessException
     */
    Integer getSize(String value)throws BusinessException;

    /**
     * 修改司机信息
     * @param driver 司机对象
     * @throws BusinessException
     */
    void update(Map<String,Object> driver) throws BusinessException;

    /**
     * 导出司机信息
     * @return
     * @throws BusinessException
     */
    List<Driver> upload()throws BusinessException;
}
